package com.heima.media.listener;

import com.heima.media.task.MediaTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author: itheima
 * @create: 2021-12-26 12:26
 */
@Component
public class ArticleListener {

    @Autowired
    private MediaTask mediaTask;


    /**
     * 服务启动自动执行该方法，完成监听器注册
     */
    @PostConstruct
    public void handlMsg() {
        mediaTask.handlMessage();
    }
}
